package com.foreknow.elmboot.mapper;

import com.foreknow.elmboot.po.Business;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BusinessMapper {

    /**
     * 根据orderTypeId查询信息
     * @param orderTypeId
     * @return
     */
    @Select("select * from business where orderTypeId = #{orderTypeId} order by businessId")
    public List<Business> getByOrderTypeId(Integer orderTypeId);


    /**
     * 根据businessId查询某一个商家信息
     * @param businessId
     * @return
     */
    @Select("select * from business where businessId = #{businessId}")
    public Business getBusinessById(Integer businessId);


}
